package com.test;

import java.util.ArrayList;
import java.util.List;

import com.test.mapper.UserMapper;
import com.test.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;



@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    @Cacheable(value = "findAll", key = "'test'")
    public List<User> findAll() {

        return userMapper.selectAll();
    }
}